package com.chenqi.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.chenqi.dao.BillboardMapper;
import com.chenqi.model.entity.Billboard;
import com.chenqi.service.BillboardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @description: 公告版业务实现
 * @program: ardaicommunity
 * @author: ChenQi
 * @create: 2021-03-2021/3/7-08-31
 */
@Service
public class BillboardServiceImpl implements BillboardService {

    @Autowired
    private BillboardMapper billboardMapper;

    @Override
    public Billboard getBillboard() {
        QueryWrapper<Billboard> queryWrapper = new QueryWrapper();
        queryWrapper.eq("isShow",1);
        Billboard billboard = billboardMapper.selectOne(queryWrapper);
        return billboard;
    }
}
